environment-setup.sh fails
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
Following the instructions at HACKING.md:
git clone https://github.com/snapcore/snapcraft.git
cd snapcraft
sudo snap install lxd
sudo lxd init --auto --storage-backend=dir
The following commands seem to be unnecessary in a fresh Ubuntu VM from a cloud
image as the ubuntu user is already a member of the lxd group as confirmed by
"groups".
# sudo adduser "$USER" lxd
# newgrp lxd
Then:
$ ./tools/environment-setup.sh
Creating snapcraft-dev
Error: Failed to run: /usr/lib/lxd/lxd forkstart snapcraft-dev /var/lib/lxd/containers /var/log/lxd/snapcraft-dev/lxc.conf:
Try `lxc info --show-log snapcraft-dev` for more info
$ lxc info --show-log snapcraft-dev
Name: snapcraft-dev
Remote: unix://
Architecture: x86_64
Created: 2019/10/11 14:00 UTC
Status: Stopped
Type: persistent
Profiles: default
Log:
lxc snapcraft-dev 20191011140030.686 ERROR conf - conf.c:lxc_map_ids:2999 - newuidmap failed to write mapping "newuidmap: uid range [1000-1001) -> [1000-1001) not allowed": newuidmap 7549 0 100000 1000 1000 1000 1 1001 101001 64535
lxc snapcraft-dev 20191011140030.686 ERROR start - start.c:lxc_spawn:1708 - Failed to set up id mapping.
lxc snapcraft-dev 20191011140030.706 WARN network - network.c:lxc_delete_network_priv:2613 - Invalid argument - Failed to remove interface "vethRXAOYT" from "lxdbr0"
lxc snapcraft-dev 20191011140030.706 ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start:842 - Received container state "ABORTING" instead of "RUNNING"
lxc snapcraft-dev 20191011140030.707 ERROR start - start.c:__lxc_start:1939 - Failed to spawn container "snapcraft-dev"
lxc 20191011140030.720 WARN commands - commands.c:lxc_cmd_rsp_recv:132 - Connection reset by peer - Failed to receive response for command "get_state"
Expected: container successfully created
Actual: lxd error on the uid mapping
I don't understand why this isn't working. Here's the problem reduced to just
lxd: https://pastebin.ubuntu.com/p/8Sfk349bJf/
It isn't clear to me if this is a problem with the instructions in HACKING.md, with your
setup script, or an lxd bug. However this is a great big obstacle in getting a
development environment set up for snapcraft, so I'm filing it here.
Evaluation history
No evaluation history available.